package tr.edu.metu.is.mega.server.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * The persistent class for the teammember database table.
 * 
 */
@Entity
public class Teammember implements Serializable, tr.edu.metu.is.mega.server.core.BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer pkid;

    // bi-directional many-to-one association to Coursestudent
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fk_studentid")
    private Coursestudent coursestudent;

    // bi-directional many-to-one association to Team
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fk_teamid")
    private Team team;

    /**
     * Default constructor.
     */
    public Teammember() {
    }

    /**
     * Returns pkid.
     * 
     * @return the pkid
     */
    @Override
    public Integer getPkid() {
        return pkid;
    }

    /**
     * Sets pkid value.
     * 
     * @param pkid the pkid to set
     */
    @Override
    public void setPkid(Integer pkid) {
        this.pkid = pkid;
    }

    /**
     * Returns coursestudent.
     * 
     * @return the coursestudent
     */
    public Coursestudent getCoursestudent() {
        return coursestudent;
    }

    /**
     * Sets coursestudent value.
     * 
     * @param coursestudent the coursestudent to set
     */
    public void setCoursestudent(Coursestudent coursestudent) {
        this.coursestudent = coursestudent;
    }

    /**
     * Returns team.
     * 
     * @return the team
     */
    public Team getTeam() {
        return team;
    }

    /**
     * Sets team value.
     * 
     * @param team the team to set
     */
    public void setTeam(Team team) {
        this.team = team;
    }

}
